"user_version":
get_text_in_child_node(vm, "version"),
"is_a_template":
- vm.attributes["is_a_template"].value,
+ vm.attributes["is_a_template"].value == 'true',
"auto_power_on":
- vm.attributes["auto_power_on"].value,
+ vm.attributes["auto_power_on"].value == 'true',
"memory_static_max":
get_child_node_attribute(vm, "memory", "static_max"),
"memory_static_min":
def extract_vdi(self, vbd_sxp, document):
src = get_child_by_name(vbd_sxp, "uname")
name = "vdi" + str(src.__hash__())
- path = src[src.find(":")+1:]
vdi = document.createElement("vdi")
vdi.attributes["read_only"] \
= (get_child_by_name(vbd_sxp, "mode") != "w") \
and "true" or "false"
- vdi.attributes["size"] \
- = str(os.path.getsize(path))
+ vdi.attributes["size"] = '-1'
vdi.attributes["type"] = "system"
vdi.attributes["shareable"] = "false"
vdi.attributes["name"] = name